<template>

<van-grid-item :style="showcolor" :to="ItemData.path" :badge="ItemData.badge?ItemData.badge:''" :icon="ItemData.icon?ItemData.icon:'photo-o'" :text="ItemData.title" />
  
  
</template>

<script>
export default {
  name:'GridItem',
  props:{
    ItemData:{
      type:Object,
      default(){
        return {}
      }
    },
    defaultcolor:{
      type:String,
      default:''
    }
  },
  computed:{
    showcolor(){
      return {color:this.ItemData.color?this.ItemData.color:this.defaultcolor}
    }
  }
}
</script>

<style>

</style>